<%@ page contentType="text/html; charset=gbk" language="java" %>
<%@page import="javax.sql.DataSource"%>
<%@page import="javax.naming.*"%>
<%@page import="java.sql.*"%>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.text.DecimalFormat" %>
<%@ include file="/include.jsp"%>
<%
    Connection conn = null;
    Statement stm = null;
    ResultSet rs = null;
    InitialContext context = new InitialContext();
    String strJava="java:comp/env/jdbc/oracle";
    DataSource ds = (DataSource) context.lookup(strJava);
    conn = ds.getConnection();
    stm = conn.createStatement();
    String group_id = request.getParameter("group_id");
    String reportId = request.getParameter("reportId");
    String  strSql="select distinct USERID, USERNAME from USER_USER where userid in ( "+
                   "select userid from user_group_map where group_id='"+group_id+"' and userid not in ("+
                   "select operatorid from city_datareports_right_"+m_strLoginCityID+
                   " d where d.operatortype=1 and resourceid='"+reportId+"'))";
    rs=stm.executeQuery(strSql);
    try
    {
       out.write(";");
    	while (rs.next())
    	{
    		out.write(rs.getString("USERID").trim()+","+rs.getString("USERNAME")+"#");
        }
    }
    catch (SQLException e)
    {
    	e.printStackTrace();
    }
    conn.close();
    rs.close();
%>
